﻿namespace ETask.Api.Dtos
{
    public class ApiResponse
    {
        public int Code { get; set; }
        public string Message { get; set; }
        public object Data { get; set; }

        public static ApiResponse Ok(object data, string message = "Success")
        {
            return new ApiResponse { Code = 200,Message = message, Data = data };
        }

        public static ApiResponse Fail(int code, string message)
        {
            return new ApiResponse { Code = code, Message = message };
        }
    }
}
